package com.ruoyi.system.api.domain.store;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 入库记录对象 finer_stock_in
 *
 * @author lmj
 * @date 2024-10-31
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
public class StockIn extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    private Integer id;

    /**
     * 入库编号
     */
    @Excel(name = "入库编号")
    private String stockInCode;
    @Excel(name = "仓库id")
    private Integer houseId;
    private String houseName;
    /**
     * 订单编号
     */
    @Excel(name = "订单编号")
    private String orderCode;

    //业务员
    @Excel(name = "业务员")
    private String businessUserName;

    //业务员id
    private Integer businessUserId;

    //业务部门
    @Excel(name = "业务部门")
    private String businessDeptName;

    //业务部门id
    private Integer businessDeptId;

    //供货商id
    private Integer supplierId;

    //供应商
    @Excel(name = "供应商名称")
    private String supName;

    /**
     * 入库类型（外联finer_inventory_type)
     */
    @Excel(name = "入库类型", readConverterExp = "入库类型（外联finer_inventory_type)")
    private Integer inventoryType;
    private String typeName;
    /**
     * 总成本
     */
    @Excel(name = "总成本")
    private BigDecimal cost;

    /**
     * 合格率
     */
    @Excel(name = "合格率")
    private Double passRate;

    /**
     * 合格数量
     */
    @Excel(name = "合格数量")
    private Integer passNum;
    /**
     * 不合格数量
     */
    @Excel(name = "不合格数量")
    private Integer noPassNum;
    /**
     * 合格成本
     */
    @Excel(name = "合格成本")
    private BigDecimal passCost;

    /**
     * 总数量
     */
    @Excel(name = "总数量")
    private Integer totalNum;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createDate;

    /**
     * 修改人
     */
    @Excel(name = "修改人")
    private String modifyBy;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date modifyDate;

    /**
     * 0：未删除1：已删除
     */
    @Excel(name = "0：未删除1：已删除")
    private Integer isDel;

    @Excel(name = "0：未确认1：已确认")
    private Integer status;
    @Excel(name="已结算金额")
    private BigDecimal paidAmount;

    /*入库详情*/
    private List<StockInDetail> stockInDetails;


    /*客户名*/
    private String cusName;

    @Override
    public String toString() {
        return "StockIn{" +
                "id=" + id +
                ", stockInCode='" + stockInCode + '\'' +
                ", orderCode='" + orderCode + '\'' +
                ", inventoryType=" + inventoryType +
                ", typeName='" + typeName + '\'' +
                ", cost=" + cost +
                ", passRate=" + passRate +
                ", passNum=" + passNum +
                ", noPassNum=" + noPassNum +
                ", passCost=" + passCost +
                ", totalNum=" + totalNum +
                ", createDate=" + createDate +
                ", modifyBy='" + modifyBy + '\'' +
                ", modifyDate=" + modifyDate +
                ", isDel=" + isDel +
                ", stockInDetails=" + stockInDetails +
                '}';
    }
}
